#include<stdio.h>
int main()
{
	int n, month, current = 1, before1 = 1, before2 = 1;
	scanf("%d", &n);
	
	if(n == 0 || n == 1)
	{
		printf("1");
		return 0;
	}
	else if(n == 2)
	{
		printf("3");
		return 0;
	}
	
	month = 3;
	while(1)
	{
		current = before1 + before2;
		before1 = before2;
		before2 = current;
		if(current >= n)
		{
			break;
		}
		month++;
	}
	printf("%d", month);
	
	return 0;
}
